package cn.bandeqing.attachment.entity;

import cn.bandeqing.attachment.req.AttachmentUploadReq;
import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 文件表 实体类。
 *
 * @author fugui
 * @since 2024-01-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "bdq_attachment", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMapper(target = AttachmentUploadReq.class, convertGenerate = false)
public class Attachment extends BaseEntity {

    @Id(keyType = KeyType.Auto)
    private Long fileId;

    private String fileOriginalName;

    private String fileSuffix;

    private String fileName;

    private String filePath;

    private Long fileSize;

    private String fileType;

    private AttachmentType objType;

    private Long objId;

    private String objIdStr;

}
